import React, { useState } from 'react'
import Main from './components/Main'
import Search from './components/Search'

export default function App() {
  // 在父组件中定义searchName状态
  const [searchName, setSearchName] = useState('')

  return (
    <div className="container">
      <Search setSearchName={setSearchName}></Search>
      <Main searchName={searchName}/>
    </div>
  )
}